package com.leave;

import com.leave.mos.entity.Order;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.ArrayList;
import java.util.List;

/**
 * Hello world!
 *
 */
@SpringBootApplication
@MapperScan("com.leave.mos.dao")
public class App {
    public static void main1(String[] args ) {
        SpringApplication.run(App.class, args);
        System.out.println("&&&&&&&&&启动成功&&&&&&&&");



    }

    public static void main(String[] args) {

        List<Order> list = new ArrayList<>();
        list.add(new Order(2,3));
        list.add(new Order(1,0));

        int x = 3;
        int y = 4;
        Order[][] orders = new Order[x][y];

        for(int i = 0 ;i < x ; i++){

            for (int j= 0 ; j<y ;j++){
                Order order = new Order();

                orders[i][j] = order;
                for (int t = 0; t<list.size();t++){
                    if(list.get(t).getX() == i && list.get(t).getY() == j ){
                        order.setStatus("1");
                    }
                }
            }
        }
        System.out.println(orders);
    }

}
